package org.grow;

import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

public class BButton extends JButton {

    private AButton aButton;

    public AButton getaButton() {
        return aButton;
    }

    public void setaButton(AButton aButton) {
        this.aButton = aButton;
    }

    public void postConstruct() {
        this.setText("B");
        addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {


            aButton.setBackground(Color.cyan);
            }
        });
    }
}
